<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .div1{
            width: 100px;
            height: 100px;
            background: red;

            float: left;
        }
        .div2{
            width: 120px;
            height: 120px;
            background: #29ff4b;

            float: left;
        }
        .div3{
            width: 150px;
            height: 150px;
            background: #5873ff;

            float: left;
        }
        .div4{
            width: 180px;
            height: 180px;
            background: #cccccc;

        }
    </style>
</head>
<body>

    <!--
        // 1：浮动只影响后面的元素
        // 2：连续浮动一行显示
        // 3：浮动以元素顶部为基准对齐
        // 4：浮动可是实现模式转换: 浮动可以把块元素在一行显示
        -->

    <div style="width: 800px; height: 600px; border: 1px solid">
        <div class="div1">
            div1<br>
            div1
        </div>
        <div class="div2">
            div2
        </div>
        <div class="div3">
            div3
        </div>

        <div class="div4"></div>

        <div class="div1">
            div1
        </div>
        <div class="div2">
            div2
        </div>
        <div class="div3">
            div3
        </div>

    </div>



</body>
</html>
